<div id="Recursive-behavior"></div>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[cvs: Branching and merging#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[cvs: Branching and merging#Merging and keywords| &lt; ]]|</td>
<td valign="middle" align="left">|[[cvs#Top| Up ]]|</td>
<td valign="middle" align="left">|[[cvs: Adding, removing, and renaming files and directories#Adding, removing, and renaming files and directories| &gt; ]]|</td>
<td valign="middle" align="left">|[[cvs: Adding, removing, and renaming files and directories#Adding, removing, and renaming files and directories| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[[cvs: Table of Contents#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[cvs: Index#Index|Index]]|</td>
<td valign="middle" align="left">|[[cvs: About this Manual#SEC_About| ? ]]|</td>
</tr></table>
<div id="Recursive-behavior-1"></div>
== Recursive behavior ==
<div id="index-Recursive-_0028directory-descending_0029"></div>
<div id="index-Directory_002c-descending"></div>
<div id="index-Descending-directories"></div>
<div id="index-Subdirectories"></div>

Almost all of the subcommands of <small>CVS</small> work
recursively when you specify a directory as an
argument.  For instance, consider this directory
structure:

<div class="example" style="margin-left: 3.2em">
       <code>$HOME</code>
         |
         +--<tt>tc</tt>
         |   |
             +--<tt>CVS</tt>
             |      (internal CVS files)
             +--<tt>Makefile</tt>
             +--<tt>backend.c</tt>
             +--<tt>driver.c</tt>
             +--<tt>frontend.c</tt>
             +--<tt>parser.c</tt>
             +--<tt>man</tt>
             |    |
             |    +--<tt>CVS</tt>
             |    |  (internal CVS files)
             |    +--<tt>tc.1</tt>
             |
             +--<tt>testing</tt>
                  |
                  +--<tt>CVS</tt>
                  |  (internal CVS files)
                  +--<tt>testpgm.t</tt>
                  +--<tt>test2.t</tt>
</div>

If &lsquo;<tt>tc</tt>&rsquo; is the current working directory, the
following is true:


* &lsquo;<code>cvs update testing</code>&rsquo; is equivalent to

<div class="example" style="margin-left: 3.2em">
 cvs update testing/testpgm.t testing/test2.t
</div>


* &lsquo;<code>cvs update testing man</code>&rsquo; updates all files in the subdirectories


* &lsquo;<code>cvs update .</code>&rsquo; or just &lsquo;<code>cvs update</code>&rsquo; updates all files in the <code>tc</code> directory

If no arguments are given to <code>update</code> it will
update all files in the current working directory and
all its subdirectories.  In other words, &lsquo;<tt>.</tt>&rsquo; is a
default argument to <code>update</code>.  This is also true
for most of the <small>CVS</small> subcommands, not only the
<code>update</code> command.

The recursive behavior of the <small>CVS</small> subcommands can be
turned off with the &lsquo;<code>-l</code>&rsquo; option.
Conversely, the &lsquo;<code>-R</code>&rsquo; option can be used to force recursion if
&lsquo;<code>-l</code>&rsquo; is specified in &lsquo;<tt>~/.cvsrc</tt>&rsquo; (see section [[cvs: Guide to CVS commands#Default options and the ~/.cvsrc file|Default options and the ~/.cvsrc file]]).

<div class="example" style="margin-left: 3.2em">
 $ cvs update -l         # <span class="roman" style="font-family:serif; font-weight:normal">Don't update files in subdirectories</span>
</div>


----

<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[cvs: Branching and merging#Branching and merging| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[cvs: Adding, removing, and renaming files and directories#Adding, removing, and renaming files and directories| &gt;&gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[[cvs: Table of Contents#SEC_Contents|Contents]]|</td>
<td valign="middle" align="left">|[[cvs: Index#Index|Index]]|</td>
<td valign="middle" align="left">|[[cvs: About this Manual#SEC_About| ? ]]|</td>
</tr></table>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
